<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsAttrTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //商品信息表
        Schema::create('goods_attr', function(Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->integer('good_id')->default(0)->comment('商品id');
            $table->string('name')->nullable()->comment('商品属性');
            $table->integer('stock')->default(0)->comment('库存');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
